Completed
Push — master ( 194c7c...434e73 )
by
unknown
02:08
created

alues.removeDuplicateꞌ)   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
c 0
b 0
f 0
nc 1
dl 0
loc 4
rs 10
nop 0
1
var chai = require('chai');
2
3
var config = require('../src/cli').config
4
config.set({root: __dirname + '/fixtures'})
0 ignored issues
show
Compatibility introduced by
Consider using the path module for constructing paths since they are otherwise not cross-OS compatible.
Loading history...
5
6
var cmsData = require('../src/cli').cmsData;
7
var Manager = require('../src/cli').Manager;
8
var fse = require('fs-extra');
9
10
describe('Request', function() {
11
  before( function(done) {
12
    Manager.instance.init()
13
      .then(function () {
14
        Manager.instance._whereKeys = ['title', 'priority', 'abe_meta', 'articles']
15
        Manager.instance.updateList()
16
17
        this.fixture = {
18
          html: fse.readFileSync(__dirname + '/fixtures/templates/article.html', 'utf8'),
0 ignored issues
show
Compatibility introduced by
Consider using the path module for constructing paths since they are otherwise not cross-OS compatible.
Loading history...
19
          json: fse.readJsonSync(__dirname + '/fixtures/data/article-1.json')
0 ignored issues
show
Compatibility introduced by
Consider using the path module for constructing paths since they are otherwise not cross-OS compatible.
Loading history...
20
        }
21
        done()
22
        
23
      }.bind(this))
24
  });
25
  /**
26
   * getAbeImport
27
   * 
28
   */
29
  it('cmsData.values.removeDuplicate', function() {
30
  	var newJson = cmsData.values.removeDuplicate(this.fixture.html, this.fixture.json)
31
  	chai.expect(newJson.title).to.be.undefined;
0 ignored issues
show
introduced by
The result of the property access to chai.expect(newJson.title).to.be.undefined is not used.
Loading history...
32
  });
33
});
34